<?php
class ErrorController extends Yaf_Controller_Abstract {

    public function errorAction($exception) {
//        $req = $this->_request ;
        //var_dump($this->actions);
        printf('出现异常，异常代码：'. $exception->getCode());
        //var_dump($this);
        switch($exception->getCode()) {
            case 516:
                //404
                header("Not Found");
                break;

            default:
                //自定义的异常
                break;
        }

    }

}
